% !Rnw weave = knitr

\documentclass{article}

\usepackage{hyperref}

\title{Table 2}
\author{Francesco Bailo}

\begin{document}

\maketitle

{\footnotesize
Bailo, F., \& Vromen, A. (2016). Hybrid social and news media protest events: from \#MarchinMarch to \#BusttheBudget in Australia. Information, Communication \& Society, 1–20. \url{https://doi.org/10.1080/1369118X.2016.1252410}
}

\vskip 20pt

<<>>=
setwd('~/Documents/replication_packages/ics_2016')
load("twitter_friend_graphs_sum_stats.RData")
@


\begin{table}[htb]
\begin{tabular}{p{4cm}cccccc}
& Mar 14 & May 14 & Jul 14 & Aug 14 & Mar 15a & Mar 15b \\
\hline
size & {\Sexpr{as.character(sizes[1])}} & {\Sexpr{as.character(sizes[2])}} & {\Sexpr{as.character(sizes[3])}} & 
  {\Sexpr{as.character(sizes[4])}} & {\Sexpr{as.character(sizes[5])}} & {\Sexpr{as.character(sizes[6])}} \\
\emph{news} accounts & {\Sexpr{as.character(sum(!is.na(closeness_news[[1]])))}} & {\Sexpr{as.character(sum(!is.na(closeness_news[[2]])))}} & {\Sexpr{as.character(sum(!is.na(closeness_news[[3]])))}} & 
  {\Sexpr{as.character(sum(!is.na(closeness_news[[4]])))}} & {\Sexpr{as.character(sum(!is.na(closeness_news[[5]])))}} & {\Sexpr{as.character(sum(!is.na(closeness_news[[6]])))}} \\
Components & \Sexpr{clusters[1]} & \Sexpr{clusters[2]} & \Sexpr{clusters[3]} & 
  \Sexpr{clusters[4]} & \Sexpr{clusters[5]} & \Sexpr{clusters[6]} \\
Components removing \emph{news} users & {\Sexpr{as.character(clusters_no_news[1])}} & 
  {\Sexpr{as.character(clusters_no_news[2])}} & {\Sexpr{as.character(clusters_no_news[3])}} & 
  {\Sexpr{as.character(clusters_no_news[4])}} & {\Sexpr{as.character(clusters_no_news[5])}} & {\Sexpr{as.character(clusters_no_news[6])}} \\
Increase & 
  {\Sexpr{as.character(round(clusters_no_news[1]/clusters[1],0))}}\% & 
  {\Sexpr{as.character(round(clusters_no_news[2]/clusters[2],0))}}\% & 
  {\Sexpr{as.character(round(clusters_no_news[3]/clusters[3],0))}}\% & 
  {\Sexpr{as.character(round(clusters_no_news[4]/clusters[4],0))}}\% & 
  {\Sexpr{as.character(round(clusters_no_news[5]/clusters[5],0))}}\% & 
  {\Sexpr{as.character(round(clusters_no_news[6]/clusters[6],0))}}\% \\
\hline
\end{tabular}
\end{table}

\end{document}